import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule } from '@angular/router';
import { SharedModule } from 'src/app/shared/shared.module';
import { ContainerListComponent } from './container-list/container-list.component';
import { ContainerDetailComponent } from './container-detail/container-detail.component';
import { ContainerComponent } from './container.component';


// 路由配置
const routes: Routes = [
  {
    // 一级路由
    path: '', component: ContainerComponent,
    // 二级路由
    children: [
      { path: '', component: ContainerListComponent, data: { breadcrumb: '容器列表' } },
      { path: 'container-list', component: ContainerListComponent, data: { breadcrumb: '容器列表' } },
      { path: 'container-detail', component: ContainerDetailComponent, data: { breadcrumb: '容器详情' } },
    ]
  },
];


@NgModule({
  imports: [
    CommonModule,
    RouterModule.forChild(routes),
    SharedModule
  ],
  declarations: [ContainerComponent, ContainerListComponent, ContainerDetailComponent]
})
export class ContainerModule { }
